package com.bk.utils;


import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;

/**
 * hibernate工具类
 * 
 * @author Administrator
 *
 */
public class HibernateUtils {

	public static SessionFactory sessionFactory = new Configuration().configure("hibernate.cfg.xml").buildSessionFactory();
	
	/**
	 * 获取session
	 * 
	 * @return
	 */
	public static Session getCurrentSession(){
		return sessionFactory.getCurrentSession();
	}
}

